home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 9
/
Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO
/
009a
/
snpd0493.zip
/
NOCTRLC.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-05
|
1KB
|
45 lines
.I 6 30
#include <dos.h>
#if defined(__ZTC__)
#define INTERRUPT
#define FAR _far
#define ENABLE int_on
#define INPORTB inp
#define OUTPORTB outp
#else
#include <conio.h>
#if defined(__TURBOC__)
#define INTERRUPT interrupt
#define FAR far
#define ENABLE enable
#define INPORTB inportb
#define OUTPORTB outportb
#else
#define INTERRUPT _interrupt
#define FAR _far
#define ENABLE _enable
#define INPORTB inp
#define OUTPORTB outp
#endif
#endif
extern void (INTERRUPT FAR *oldint9)(void); /* Caller must set this */
void INTERRUPT FAR noctrl(void)
{
unsigned char byte;
.D 7 3
.I 10 4
ENABLE();
if ((byte = (unsigned char)INPORTB(0x60)) == 29)
.D 11 5
.I 28 4
byte = (unsigned char)INPORTB(0x61);
OUTPORTB(0x61,byte | 0x80);
OUTPORTB(0x61,byte);
OUTPORTB(0x20,0x20);
.D 29 4